﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VsxFactory.Modeling.Repository;
using System.IO;
using VsxFactory.Modeling.VisualStudio;

namespace VsxFactory.Modeling.Strategies
{
    public static class StrategySettingsExtensions
    {
        public static string ResolvePackageFolder(this IStrategySettings settings, PackageInfo package)
        {
            string folder = settings.GetPackageFolder(package.Kind);
            return Path.Combine(folder, package.ID);
        }

        public static string ResolvePackageFileName(this IStrategySettings settings, PackageInfo package)
        {
            string folder = settings.GetPackageFolder(package.Kind);
            return Path.Combine(folder, package.ID + PackageHelper.PACKAGE_EXTENSION);
        }
    }
}
